<?php
require('includes/top.php');

foreach($_POST as $key => $value)
{
if($value!="" && $value!="Save")
{
$data = $key.'_'.$value;

$laptop_remarks_array = explode('_',$data);

$remarks = $laptop_remarks_array[2];


$product_id = $laptop_remarks_array[1];

$date = date("d-m-Y");

$sql="INSERT INTO repair_laptop(`laptop_id`,`remarks`,`date`) VALUES ('$product_id','$remarks','$date')";
$result=mysql_query($sql);

}
}


if($result>0)
{
header('Location:view_repair_list_main.php?v=success');
}
else
{
header('Location:view_repair_list_main.php?v=err');
}
?>